package com.neusoft.yuejian_6.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.neusoft.yuejian_6.R;
import com.squareup.picasso.Picasso;

public class ShowDetailActivity extends AppCompatActivity {

    private ImageView s_pic;
    private ImageView s_pic2;
    private ImageView s_pic3;
    private TextView s_content;
    private TextView s_date;
    private TextView s_address;
    private int s_id;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show_detail);
        initView();
        getShowData();
    }

    private void getShowData() {
        Bundle bundle = this.getIntent().getExtras();
        String showcontent = bundle.getString("s_content");
        String showaddress = bundle.getString("s_address");
        String showdate = bundle.getString("s_date");
        // int tprice = bundle.getInt("t_price");
        String spic = "http://10.0.2.2/neu1_yuejian/Public/Admin/photo/"+bundle.getString("s_pic");
        String spic2 = "http://10.0.2.2/neu1_yuejian/Public/Admin/photo/"+bundle.getString("s_pic2");
        String spic3 = "http://10.0.2.2/neu1_yuejian/Public/Admin/photo/"+bundle.getString("s_pic3");
        //String ttime = bundle.getString("t_time");
        //System.out.print("taddress");
        s_content.setText(showcontent);
        s_address.setText(showaddress);
        s_date.setText(showdate);
        // t_price.setText(tprice+"");
      //  System.out.print("s_date");
        //   t_time.setText(ttime);
        Picasso.with(this).load(spic).into(s_pic);
        Picasso.with(this).load(spic2).into(s_pic2);
        Picasso.with(this).load(spic3).into(s_pic3);
    }


    private void initView() {

        s_pic = (ImageView) findViewById(R.id.s_pic);
        s_pic2 = (ImageView) findViewById(R.id.s_pic2);
        s_pic3 = (ImageView) findViewById(R.id.s_pic3);
        s_content = (TextView) findViewById(R.id.  s_content );
        s_address = (TextView) findViewById(R.id. s_address);
        s_date = (TextView) findViewById(R.id.   s_date);
    }

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */

}
